<template>
    <div class="content">
        <h4 class="heder">
            <span>发表时间：{{datas.add_time|time('yyyy-mm-dd hh:mm:ss')}}</span>
            <span>点击：{{datas.click}}次</span>
        </h4>
        <div v-html="datas.content"></div>
        <leaveWord :ids="id"></leaveWord>
    </div>
</template>
<script>
    import {Toast} from 'mint-ui'
    import leaveWord from '../leaveWord/leaveWord.vue'
    export default{
        data(){
            return {
                datas : {
                },
                id:this.$route.params.id
            }
        },
        created(){
            this.getNewShow()
        },
        methods : {
            getNewShow(){
                var id = this.$route.params.id
                this.$http.get(this.base_url+'vue/datas/new/newShow.json','json').then(function(data){
                    if(data.body.status==0){
                        console.log(data)
                        this.datas = data.body.data[id]
                    }else{
                        Toast('获取数据失败')
                    }
                    
                })
            }
        },
        components:{
            leaveWord
        }
    }
</script>
<style scoped>
    .content{
        padding: 0 2% 52px 2%;
    }
    .heder{
        display: flex;
        color: #259efc;
        font-size: 16px;
        line-height: 2.6;
        justify-content: space-between;
        border-bottom:1px solid #cdcdcc; 
    }
</style>


